<seed-content #content *ngIf="ticketDetail">
  <seed-toolbar-header>
    <seed-toolbar-title>商品详情</seed-toolbar-title>
    <seed-toolbar-menu></seed-toolbar-menu>
  </seed-toolbar-header>
  <div class="seed-goods-detail-warp" >
    <goods-slider  [slider]="ticketDetail.imgList" ></goods-slider>
    <div class="goods-part">
      <div class="goods-ticket-box">
      <p class="goods-ticket-time">
        <span class="ticket-name">{{ticketDetail.name}}</span>
        <seed-badge-label class="ticket-cate-name ">{{ticketDetail.cateName}}</seed-badge-label>
      </p>
      <p class="goods-ticket-price">
        <span class="ticket-price" *ngIf=" ticketDetail.minPrice  == ticketDetail.maxPrice && ticketDetail.minPrice > 0">
          ¥{{ticketDetail.minPrice  | money }} </span>
        <span class="ticket-price" *ngIf="ticketDetail.minPrice == 0 && ticketDetail.maxPrice == 0">¥ 0<span class="goods-price-qi"></span> </span>
        <span class="ticket-price" *ngIf="ticketDetail.minPrice == 0 && ticketDetail.maxPrice && ticketDetail.maxPrice > 0">¥ 0 ~ {{ticketDetail.maxPrice  | money}} </span>
        <span class="ticket-price" *ngIf="ticketDetail.minPrice != ticketDetail.maxPrice && ticketDetail.minPrice > 0">
          ¥{{ticketDetail.minPrice  | money }} ~ {{ticketDetail.maxPrice  | money}}</span>
      </p>
      </div>
      <div class="goods-ticket-box">
        <div class="goods-ticket-time">
          <span class="ticket-time-title">时间：</span>
          <span class="goods-start-time" *ngIf="!ticketDetail.endDateTime">{{ticketDetail.startDateTime | dateChange}} </span>
          <span class="goods-start-time" *ngIf="ticketDetail.endDateTime">{{ticketDetail.startDateTime | date:'yyyy-MM-dd' }} </span>
          <span class="goods-time-dash" *ngIf="ticketDetail.endDateTime">-</span>
          <span class="goods-end-time">{{ticketDetail.endDateTime | date:'yyyy-MM-dd' }} </span>
        </div>
        <p class="goods-ticket-area">
          <span class="currency">地点：</span>
          <span class="goods-price">{{ticketDetail.address[1]}}&nbsp;{{ticketDetail.address[2]}} </span>
        </p>
        <p class="goods-ticket-area">
          <span class="currency">取票：</span>
          <span class="goods-price" *ngIf="ticketDetail.obtainTypes[0] && !ticketDetail.obtainTypes[1] ">{{ticketDetail.obtainTypes[0]}}</span>
          <span class="goods-price" *ngIf="ticketDetail.obtainTypes[1] && !ticketDetail.obtainTypes[2]">{{ticketDetail.obtainTypes[0]}}、{{ticketDetail.obtainTypes[1]}}}</span>
          <span class="goods-price" *ngIf="ticketDetail.obtainTypes[2]">{{ticketDetail.obtainTypes[0]}}、{{ticketDetail.obtainTypes[1]}}、{{ticketDetail.obtainTypes[2]}}</span>
        </p>
      </div>
    </div>
    <div class="goods-part">
      <seed-item class="goods-spec seed-item-block"
                 (click)="goToGoodsFAQ(ticketDetail.code)">常见问题
        <seed-icons [icon]="'arrowRight'"></seed-icons>
      </seed-item>
    </div>
    <div class="goods-part">
      <h3 class="goods-info-title" downloadApp>图文详情</h3>
      <div class="goods-info" [innerHtml]="ticketDetail.description">
      </div>
    </div>

  </div>

  <div class="goods-purchase-btn seed-scroll-outside seed-flexbox" >
    <div class="collect" [class.collected]="ticketDetail.favorited == true" (click)="handleCollect()">
      <span  *ngIf="ticketDetail.favoritedCount <= 999 ">{{ticketDetail.favoritedCount}}</span>
      <span *ngIf="ticketDetail.favoritedCount > 999 ">999+</span>
    </div>
    <button [disabled]="disposeGoodsPurchase" (click)="handlePurchaseEvent(modal)">{{goodsStatusText}}</button>
  </div>
</seed-content>
<seed-modal #modal class="seed-goods-detail">
  <seed-goods-ticket-purchase
    *ngIf="ticketDetail"
    class="seed-modal-content"  [tickets]="ticketDetail">
  </seed-goods-ticket-purchase>
</seed-modal>
